/**
 * 用户相关的请求模块
 */
import request from '@/utils/request'

/**
  * 用户登录
  */
export const login = data => {
  return request({
    method: 'POST',
    url: '/authorizations',
    data
  })
}

/**
  * 发送验证码
  */
export const getSmsCode = mobile => {
  return request({
    method: 'GET',
    url: `/sms/codes/${mobile}`
  })
}

/**
  * 获取用户信息
  */
export const getUserMessage = mobile => {
  return request({
    method: 'GET',
    url: '/user'
  })
}
